package dao

import (
	"errors"
	"hospital-srv/handler/models"
)

// 查询某天每小时数据总结
func GetOneDayHourData(userId, equipmentId int64, date string) ([]models.HealthDatas, error) {
	var h models.HealthDatas
	h.UserId = uint(userId)
	h.EquipmentId = uint(equipmentId)

	// 查询该日期的所有健康数据
	data, err := h.MongoDbGetOneDayData(date)
	if err != nil {
		return nil, errors.New("mongodb查询数据失败" + err.Error())
	}

	return data, nil
}
